package com.hy.video.monitor.media.zlm.dto;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.hy.video.monitor.gb28181.bean.GbStream;

@JsonIgnoreProperties(ignoreUnknown = true)
public class StreamProxyItem extends GbStream {

    /**
     * ZLM 接口：/index/api/startRecord
     * 功能：开始录制hls或MP4
     * 范例：http://127.0.0.1/index/api/startRecord?type=1&vhost=__defaultVhost__&app=live&stream=obs
     */
    private String type;// 0为hls，1为mp4
    private String app;// 添加的流的应用名，例如live
    private String stream;// 添加的流的id名，例如test
    private String mediaServerId;// 流媒体Id
    private String url;// 拉流地址，例如rtmp://live.hkstv.hk.lxdns.com/live/hks2
    /**
     * ZLM 接口：/index/api/addFFmpegSource
     * 功能：通过fork FFmpeg进程的方式拉流代理，支持任意协议
     * 范例：http://127.0.0.1/index/api/addFFmpegSource?src_url=http://live.hkstv.hk.lxdns.com/live/hks2/playlist.m3u8&dst_url=rtmp://127.0.0.1/live/hks2&timeout_ms=10000
     */
    private String src_url;// FFmpeg拉流地址,支持任意协议或格式(只要FFmpeg支持即可)
    private String dst_url;// FFmpeg rtmp推流地址，一般都是推给自己，例如rtmp://127.0.0.1/live/stream_form_ffmpeg
    private int timeout_ms;// FFmpeg推流成功超时时间
    private String ffmpeg_cmd_key;// FFmpeg命令参数模板，置空则采用配置项:ffmpeg.cmd
    private String rtp_type;// rtsp拉流时，拉流方式，0：tcp，1：udp，2：组播
    private boolean enable;// "hook.enable" : "1", 是否开启录制
    private boolean enable_hls; // 是否开启hls录制
    private boolean enable_mp4;// 是否开启mp4录制
    private boolean enable_remove_none_reader; // 无人观看时删除
    private String platformGbId;// 平台国标Id
    private String createTime;// 创建时间

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Override
    public String getApp() {
        return app;
    }

    @Override
    public void setApp(String app) {
        this.app = app;
    }

    @Override
    public String getStream() {
        return stream;
    }

    @Override
    public void setStream(String stream) {
        this.stream = stream;
    }

    @Override
    public String getMediaServerId() {
        return mediaServerId;
    }

    @Override
    public void setMediaServerId(String mediaServerId) {
        this.mediaServerId = mediaServerId;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getSrc_url() {
        return src_url;
    }

    public void setSrc_url(String src_url) {
        this.src_url = src_url;
    }

    public String getDst_url() {
        return dst_url;
    }

    public void setDst_url(String dst_url) {
        this.dst_url = dst_url;
    }

    public int getTimeout_ms() {
        return timeout_ms;
    }

    public void setTimeout_ms(int timeout_ms) {
        this.timeout_ms = timeout_ms;
    }

    public String getFfmpeg_cmd_key() {
        return ffmpeg_cmd_key;
    }

    public void setFfmpeg_cmd_key(String ffmpeg_cmd_key) {
        this.ffmpeg_cmd_key = ffmpeg_cmd_key;
    }

    public String getRtp_type() {
        return rtp_type;
    }

    public void setRtp_type(String rtp_type) {
        this.rtp_type = rtp_type;
    }

    public boolean isEnable() {
        return enable;
    }

    public void setEnable(boolean enable) {
        this.enable = enable;
    }

    public boolean isEnable_hls() {
        return enable_hls;
    }

    public void setEnable_hls(boolean enable_hls) {
        this.enable_hls = enable_hls;
    }

    public boolean isEnable_mp4() {
        return enable_mp4;
    }

    public void setEnable_mp4(boolean enable_mp4) {
        this.enable_mp4 = enable_mp4;
    }

    public String getPlatformGbId() {
        return platformGbId;
    }

    public void setPlatformGbId(String platformGbId) {
        this.platformGbId = platformGbId;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public boolean isEnable_remove_none_reader() {
        return enable_remove_none_reader;
    }

    public void setEnable_remove_none_reader(boolean enable_remove_none_reader) {
        this.enable_remove_none_reader = enable_remove_none_reader;
    }

}
